Integrand size = 42, antiderivative size = 214 \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx=-\frac {2 \left (6 a b B+3 a^2 C+5 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 \left (5 a^2 B+7 b^2 B+14 a b C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {2 a^2 B \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (2 b B+a C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 \left (5 a^2 B+7 b^2 B+14 a b C\right ) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (6 a b B+3 a^2 C+5 b^2 C\right ) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}} \]
[Out]
Time = 0.65 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3108, 3067, 3100, 2827, 2716, 2720, 2719} \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx=\frac {2 \left (5 a^2 B+14 a b C+7 b^2 B\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}-\frac {2 \left (3 a^2 C+6 a b B+5 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 \left (5 a^2 B+14 a b C+7 b^2 B\right ) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (3 a^2 C+6 a b B+5 b^2 C\right ) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 a^2 B \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (a C+2 b B) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)} \]
[In]
[Out]
Rule 2716
Rule 2719
Rule 2720
Rule 2827
Rule 3067
Rule 3100
Rule 3108
Rubi steps \begin{align*} \text {integral}& = \int \frac {(a+b \cos (c+d x))^2 (B+C \cos (c+d x))}{\cos ^{\frac {9}{2}}(c+d x)} \, dx \\ & = \frac {2 a^2 B \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}-\frac {2}{7} \int \frac {-\frac {7}{2} a (2 b B+a C)-\frac {1}{2} \left (5 a^2 B+7 b^2 B+14 a b C\right ) \cos (c+d x)-\frac {7}{2} b^2 C \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x)} \, dx \\ & = \frac {2 a^2 B \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (2 b B+a C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}-\frac {4}{35} \int \frac {-\frac {5}{4} \left (5 a^2 B+7 b^2 B+14 a b C\right )-\frac {7}{4} \left (6 a b B+3 a^2 C+5 b^2 C\right ) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx \\ & = \frac {2 a^2 B \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (2 b B+a C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}-\frac {1}{7} \left (-5 a^2 B-7 b^2 B-14 a b C\right ) \int \frac {1}{\cos ^{\frac {5}{2}}(c+d x)} \, dx-\frac {1}{5} \left (-6 a b B-3 a^2 C-5 b^2 C\right ) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx \\ & = \frac {2 a^2 B \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (2 b B+a C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 \left (5 a^2 B+7 b^2 B+14 a b C\right ) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (6 a b B+3 a^2 C+5 b^2 C\right ) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}-\frac {1}{21} \left (-5 a^2 B-7 b^2 B-14 a b C\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx-\frac {1}{5} \left (6 a b B+3 a^2 C+5 b^2 C\right ) \int \sqrt {\cos (c+d x)} \, dx \\ & = -\frac {2 \left (6 a b B+3 a^2 C+5 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 \left (5 a^2 B+7 b^2 B+14 a b C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {2 a^2 B \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (2 b B+a C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 \left (5 a^2 B+7 b^2 B+14 a b C\right ) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (6 a b B+3 a^2 C+5 b^2 C\right ) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}} \\ \end{align*}
Time = 6.17 (sec) , antiderivative size = 191, normalized size of antiderivative = 0.89 \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx=\frac {2 \left (-21 \left (6 a b B+3 a^2 C+5 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+5 \left (5 a^2 B+7 b^2 B+14 a b C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\frac {15 a^2 B \sin (c+d x)}{\cos ^{\frac {7}{2}}(c+d x)}+\frac {21 a (2 b B+a C) \sin (c+d x)}{\cos ^{\frac {5}{2}}(c+d x)}+\frac {5 \left (5 a^2 B+7 b^2 B+14 a b C\right ) \sin (c+d x)}{\cos ^{\frac {3}{2}}(c+d x)}+\frac {21 \left (6 a b B+3 a^2 C+5 b^2 C\right ) \sin (c+d x)}{\sqrt {\cos (c+d x)}}\right )}{105 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(831\) vs. \(2(246)=492\).
Time = 18.61 (sec) , antiderivative size = 832, normalized size of antiderivative = 3.89
method | result | size |
default | \(\text {Expression too large to display}\) | \(832\) |
parts | \(\text {Expression too large to display}\) | \(1024\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.12 (sec) , antiderivative size = 314, normalized size of antiderivative = 1.47 \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx=-\frac {5 \, \sqrt {2} {\left (5 i \, B a^{2} + 14 i \, C a b + 7 i \, B b^{2}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 \, \sqrt {2} {\left (-5 i \, B a^{2} - 14 i \, C a b - 7 i \, B b^{2}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 21 \, \sqrt {2} {\left (3 i \, C a^{2} + 6 i \, B a b + 5 i \, C b^{2}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 21 \, \sqrt {2} {\left (-3 i \, C a^{2} - 6 i \, B a b - 5 i \, C b^{2}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - 2 \, {\left (21 \, {\left (3 \, C a^{2} + 6 \, B a b + 5 \, C b^{2}\right )} \cos \left (d x + c\right )^{3} + 15 \, B a^{2} + 5 \, {\left (5 \, B a^{2} + 14 \, C a b + 7 \, B b^{2}\right )} \cos \left (d x + c\right )^{2} + 21 \, {\left (C a^{2} + 2 \, B a b\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{4}} \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{2}}{\cos \left (d x + c\right )^{\frac {11}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{2}}{\cos \left (d x + c\right )^{\frac {11}{2}}} \,d x } \]
[In]
[Out]
Time = 4.85 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.09 \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx=\frac {30\,B\,a^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {7}{4},\frac {1}{2};\ -\frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )+70\,B\,b^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+84\,B\,a\,b\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{105\,d\,{\cos \left (c+d\,x\right )}^{7/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {6\,C\,a^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+30\,C\,b^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )+20\,C\,a\,b\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{15\,d\,{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}} \]
[In]
[Out]